A transmitter for a known vehicular wireless door lock control system is proposed in U.S. Pat. No. 6,263,197 (JP-A-8-303078). The transmitter has an integral memory for storing a code (rolling code) for counting the number of times that a key operation section is operated. The rolling code is incremented every time the key operation section is operated, and the incremented rolling code is written into a memory. The transmitter generates transmission data including its unique ID code, the rolling code stored in the memory, and instruction data corresponding to instruction information obtained from the key operation section and transmits it. The reason why the rolling code is included in the transmission data is to prohibit a release of the door lock of the vehicle when the transmission data is intercepted by a malicious person and copied data is transmitted to release the door lock.
The transmitter is normally powered by a button battery. Therefore, a source voltage decreases as the battery drains along with the use of the transmitter. In the transmitter, the processes including the increment of the rolling code and the writing of the rolling code into the memory may not be normally performed when the source voltage has decreased.
The transmitter has a rolling code region and a check region in the memory for enabling determination whether the writing of the rolling code is normally performed. The rolling code region and the check region are provided for storing the rolling code and checking for errors in the writing of the rolling code into the rolling code region. A flag in the check region is cleared immediately before the start of the rolling code writing, and the flag in the check region is set immediately after the completion of the rolling code writing.
If the source voltage decreases during the writing of the rolling code into the rolling code region and the rolling code writing process is not normally performed, the flag in the check region remains cleared. Thus, it is determined whether the rolling code is normally written into the rolling code region by checking the level of the flag in the check region.
Because the check region is required in the memory, the amount of memory is increased. Moreover, writing into the check region is performed twice for one key operation. The memory (EEPROM) has limitation on the number of writing that is guaranteed. Therefore, the durability of the memory decreases as the number of writing increases.